// 路由配置文件
import { createRouter,createWebHashHistory } from "vue-router";


// 定义router
const routes =[
    {
        path:'/',
        component:()=> import('../views/Main.vue'),
        children:[
            {
                path:'/',
                name:'home',
                component:()=>import('../views/home/Home.vue')
            },
            {
                path:'/mall',
                name:'mall',
                component:()=>import('../views/mall/Mall.vue')
            },
            {
                path:'/user',
                name:'user',
                component:()=>import('../views/user/User.vue')
            },
        ]
    }
]

const router =createRouter({
    history:createWebHashHistory(),
    routes
})

export default router